// +---------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +---------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +---------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +---------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------

import LayoutMain from '@/layout';
import setting from '@/setting';
let routePre = setting.routePre;

const meta = {
  auth: true,
};

const pre = 'classification_';

export default {
  path: routePre + '/classification',
  name: 'classification',
  header: 'classification',
  redirect: {
    name: `${pre}index`,
  },
  meta,
  component: LayoutMain,
  children: [
    {
      path: 'certificateCategory/index',
      name: `${pre}certificateCategory/index`,
      meta: {
        auth: ['admin-classification-certificateCategory-index'],
        title: '证书分类',
      },
      component: () => import('@/pages/classification/certificateCategory/index'),
    },
    {
      path: 'certificate/index',
      name: `${pre}certificate/index`,
      meta: {
        auth: ['admin-classification-certificate-index'],
        title: '证书列表',
      },
      component: () => import('@/pages/classification/certificate/index'),
    },
    {
      path: 'certificate/add_certificate/:id?',
      name: `${pre}addCertificate`,
      meta: {
        auth: ['admin-classification-addCertificate'],
        title: '添加证书',
        activeMenu: routePre + '/classification/certificate/index',
      },
      component: () => import('@/pages/classification/certificate/addCertificate'),
    },
    {
      path: 'skillCategory/index',
      name: `${pre}skillCategory/index`,
      meta: {
        auth: ['admin-classification-skillCategory-index'],
        title: '技能分类',
      },
      component: () => import('@/pages/classification/skillCategory/index'),
    },
    {
      path: 'skill/index',
      name: `${pre}skill/index`,
      meta: {
        auth: ['admin-classification-skill-index'],
        title: '技能列表',
      },
      component: () => import('@/pages/classification/skill/index'),
    },
    {
      path: 'skill/add_skill/:id?',
      name: `${pre}addSkill`,
      meta: {
        auth: ['admin-classification-addSkill'],
        title: '添加技能',
        activeMenu: routePre + '/classification/skill/index',
      },
      component: () => import('@/pages/classification/skill/addSkill'),
    },
    {
      path: 'serviceCategory/index',
      name: `${pre}serviceCategory/index`,
      meta: {
        auth: ['admin-classification-serviceCategory-index'],
        title: '服务分类',
      },
      component: () => import('@/pages/classification/serviceCategory/index'),
    },
    {
      path: 'serviceSubject/index',
      name: `${pre}serviceSubject/index`,
      meta: {
        auth: ['admin-classification-serviceSubject-index'],
        title: '服务科目列表',
      },
      component: () => import('@/pages/classification/serviceSubject/index'),
    },
    {
      path: 'serviceSubject/add_service/:id?',
      name: `${pre}addService`,
      meta: {
        auth: ['admin-classification-addService'],
        title: '添加服务科目',
        activeMenu: routePre + '/classification/serviceSubject/index',
      },
      component: () => import('@/pages/classification/serviceSubject/addService'),
    },
    {
      path: 'serviceType/index',
      name: `${pre}serviceType/index`,
      meta: {
        auth: ['admin-classification-serviceType-index'],
        title: '服务类型',
      },
      component: () => import('@/pages/classification/serviceType/index'),
    },
  ],
};
